<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=utf-8" import="com.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	    <title>社会保障卡质量问题补卡审核登记</title>
	    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	
	<script src="${pageContext.request.contextPath }/scripts/boot.js"
	type="text/javascript"></script>
	<script src="${pageContext.request.contextPath }/scripts/LodopFuncs.js" type="text/javascript"></script> 
<style type="text/css">
html,body {
	font-size: 12px;
	padding: 0;
	margin: 0;
	border: 0;
	height: 100%;
	overflow: hidden;
}
</style>
	

  </head>
  
  <body onload="bklx()">
  <fieldset style="border:solid 1px #aaa;padding:3px;">
  <legend>质量问题补卡审核登记</legend>
  <form id="form1"  method="post">
   <div style="padding-left:11px;padding-bottom:5px;text-align:center">
  <table width="100%" style="table-layout:fixed" >
    <tr>
    <td style="width:90px;text-align:right">补卡原因:</td>
      <td style="width:180px"><input name="azf644" class="mini-combobox"  inputStyle="background:rgb(241,241,243)" readonly="readonly" value="9" style="width:100%" textField="aaa103" valueField="aaa102"
      url="${pageContext.request.contextPath }/BK.do?method=getBKLX&sj=ZKLX" /></td>  
      <td style="white-space:nowrap;width:90px;text-align:right" >社会保障卡号:</td>
      <td style="width:180px"><input name="aac001" class="mini-textbox" onenter="onKeyEnter" vtype="int;minLength:10" maxlength="10" required="true" style="width:100%" emptyText="请输入社会保障卡号"/>
      <input name="azf625" class="mini-hidden" /></td>            
      <td style="width:90px;text-align:right">原制卡批次:</td>
      <td style="width:180px"><input name="aaz801" class="mini-textbox" style="width:100%" inputStyle="background:rgb(241,241,243)" allowInput="false"/></td>   
      <td style="width:180px" colspan="2" rowspan="5">
      <div id="pic" align="center" style="height:100%;background-color:rgb(241,241,243);">
	  <img src="" id="img0" style="height:200px;width:150px"/></div></td>
    </tr>
    <tr>     
      <td style="width:90px;text-align:right">盒号:</td>
      <td style="width:180px" ><input name="aaz632" class="mini-textbox" inputStyle="background:rgb(241,241,243)" style="width:100%" allowInput="false"/></td> 
       <td style="width:90px;text-align:right">姓名:</td>
      <td style="width:180px"><input name="aac003" class="mini-textbox" inputStyle="background:rgb(241,241,243)" style="width:100%" allowInput="false"/></td>
      <td style="width:90px;text-align:right">姓名拼音码:</td>
      <td style="width:180px"><input name="aaz742" class="mini-textbox"    style="width:100%"  inputStyle="background:rgb(241,241,243)" style="width:100%" allowInput="false" /></td>
    </tr>
     <tr>
      <td style="width:90px;text-align:right">性别:</td>
      <td style="width:180px"><input name="aac004" class="mini-combobox" textField="aaa103" valueField="aaa102" 
         url="${pageContext.request.contextPath }/BK.do?method=getselectxb&xb=AAC004" inputStyle="background:rgb(241,241,243)" style="width:100%" readonly="readonly" allowInput="false"/>
        </td>
      <td style="width:90px;text-align:right">出生年月:</td>
      <td style="width:180px"><input name="aac006" class=mini-datepicker valueType="String" inputStyle="background:rgb(241,241,243)" readonly="readonly" style="width:100%" allowInput="false"/></td>
      <td style="width:90px;text-align:right">民族:</td>
      <td style="width:180px"><input name="aac005" class="mini-combobox" inputStyle="background:rgb(241,241,243)" style="width:100%" textField="aaa103" valueField="aaa102"
      url="${pageContext.request.contextPath }/BK.do?method=getselectmz&mz=AAC005" allowInput="false" readonly="readonly"/>
     </td>
    </tr>
    <tr> 
       <td style="width:90px;text-align:right">证件类型:</td>
      <td style="width:180px"><input name="aac058" class="mini-combobox" style="width:100%" inputStyle="background:rgb(241,241,243)" 
      textField="aaa103" valueField="aaa102" url="${pageContext.request.contextPath }/BK.do?method=getselectzj&zj=AAC058" allowInput="false" readonly="readonly"/>
       </td>
      <td style="width:90px;text-align:right">证件号:</td>
      <td style="width:180px"><input name="aac002" class="mini-textbox" style="width:100%" inputStyle="background:rgb(241,241,243)"  allowInput="false"/></td>
    <td style="width:90px;text-align:right">通卡卡面号:</td>
      <td style="width:180px"><input name="caz002" class="mini-textbox" style="width:100%" inputStyle="background:rgb(241,241,243)"  allowInput="false"/></td>          
    </tr>  
    <tr> 
      <td style="width:90px;text-align:right">银行类型:</td>
      <td style="width:180px"><input name="aae008_new" class="mini-combobox"  style="width:100%" inputStyle="background:rgb(241,241,243)" readonly="readonly" textField="aaa103" valueField="aaa102"  allowInput="false" 
      url="${pageContext.request.contextPath }/BK.do?method=getyinhang&sj=bank"/></td>                  
     <td style="width:90px;text-align:right">银行卡号:</td>
      <td style="width:180px"><input name="aae009" class="mini-textbox" style="width:100%" inputStyle="background:rgb(241,241,243)"  allowInput="false"/></td>     
      <td style="width:90px;text-align:right">发证机构:</td>
      <td style="width:180px"><input name="aaz768" class="mini-textbox" inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly"  style="width:100%"/></td>
    </tr>    
    <tr></tr>
    <tr></tr>
    <tr>
     <td style="width:90px;text-align:right">银行:</td>
      <td style="width:180px"><input name="aae008" class="mini-combobox"  style="width:100%"  inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly" textField="aaa103" valueField="aaa102" 
      url="${pageContext.request.contextPath }/BK.do?method=getyinhang&sj=bank"/></td>                      
      <td style="width:90px;text-align:right">联系电话:</td>
      <td style="width:180px"><input name="azf642" class="mini-textbox"  inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly"  style="width:100%" /></td>          
      <td style="width:90px;text-align:right">地址邮编:</td>
      <td style="width:180px"><input name="aae007" class="mini-textbox" inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly"  style="width:100%"/></td>  
    </tr>
    <tr></tr>
    <tr></tr>
     <tr></tr>
    <tr></tr>
    <tr></tr>  
    <tr>   
      <td style="width:90px;text-align:right">联系地址:</td>
      <td style="width:778px" colspan="5"><input name="aac046" class="mini-textbox" inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly"  style="width:100%"/>
      <input name="aaz777" class="mini-hidden" style="width:100%"/></td>         
    </tr>
     <tr></tr>
    <tr></tr>
     <tr></tr>
    <tr></tr>
    <tr></tr> 
    <tr>
    <td style="width:90px;text-align:right">备注:</td>
     <td style="width:778px" colspan="5"><input name="aaz523" class="mini-textbox"  inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly"  style="width:100%"/></td>  
    </tr>    
       <tr></tr>
    <tr></tr>
     <tr></tr>
    <tr></tr>
    <tr></tr> 
    <tr>
    <td style="width:90px;text-align:right">领卡网点:</td>
    <td style="width:15%;" colspan="2"><input  name="aaz730" class="mini-combobox" style="width:100%;" textField="mch" valueField="bm"  inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly"  url="${pageContext.request.contextPath }/BK.do?method=getSelectqh"/></td>
 	<td style="width:15%;" colspan="3"><input  name="aaz802" class="mini-combobox" textField="mch" valueField="bm" style="width:100%;" inputStyle="background:rgb(241,241,243)" allowInput="false" readonly="readonly" url="${pageContext.request.contextPath }/BK.do?method=getjd"/></td>
    </tr>    
  </table>
</div>
</form>
   <div style="text-align:center;padding:10px;">
				<a class="mini-button" onclick="onOk" iconCls="icon-ok" id="onoks"   enabled="false"
					style="width:60px;margin-right:20px;">确定</a> <a class="mini-button"
					iconCls="icon-ok" onclick="Preview"   id="print" enabled="false"
					style="width:60px;margin-right:20px;">打印</a>
					<a class="mini-button"
					iconCls="icon-remove" onclick="onReset"  
					style="width:60px;margin-right:20px;">重置</a>
			</div>
</fieldset>
<script type="text/javascript">
mini.parse();
    var form = new mini.Form("form1");
     function bklx() {
       mini.getbyName("azf644").setValue("9");
    }
function onKeyEnter()
        {
          var aac001 = mini.getbyName("aac001").getValue().trim(); 
          var azf644 = mini.getbyName("azf644").getValue().trim();  
          if(azf644=="")   
          {
            mini.alert("请选择补卡原因");
            return;
          }    
           else {                           
           $.ajax({               
                    url: "/sbk/BK.do?method=getunitdata2",                 
                    data:{aac001:aac001,azf644:azf644},
                    success: function (text) {                                        
                    var o = mini.decode(text);  
                   if(o.msg==""||null==o.msg) 
                    {
                    $("#img0").attr("src", "${pageContext.request.contextPath}/Picture/"+aac001+".JPG") ;
                    mini.getbyName("aac004").setValue(o.aac004);
                    mini.getbyName("aac003").setValue(o.aac003);
                    mini.getbyName("aac006").setValue(o.aac006);
                    mini.getbyName("aac005").setValue(o.aac005);
                    mini.getbyName("aaz632").setValue(o.aaz632);
                    mini.getbyName("aaz801").setValue(o.aaz801);
                    mini.getbyName("aac058").setValue(o.aac058);
                    mini.getbyName("aac002").setValue(o.aac002); 
                    mini.getbyName("aaz742").setValue(o.aaz742); 
                    mini.getbyName("aaz777").setValue(o.aaz777);
                    mini.getbyName("aae009").setValue(o.aae009);
                    mini.getbyName("caz002").setValue(o.caz002);
                    mini.getbyName("aae008_new").setValue(o.aae008);  
                    mini.getbyName("aaz768").setValue(o.aaz768);
                    mini.getbyName("aae008").setValue(o.aae008x);
                    mini.getbyName("azf642").setValue(o.azf642);
                    mini.getbyName("aae007").setValue(o.aae007);
                    mini.getbyName("aac046").setValue(o.aac046);
                    mini.getbyName("aaz523").setValue(o.aaz523);
                    mini.getbyName("aaz730").setValue(o.aaz730);
                    mini.getbyName("aaz802").setValue(o.aaz802);
                    mini.getbyName("azf625").setValue(o.azf625);
                    mini.get("onoks").setEnabled(true);
                    labelModel1();
                    }
                    else
                    {
                       mini.alert(o.msg);
                    }                                    
                    }             
                    
                });   
                }     
        }
        
         function onOk(e) {
       
           SaveData();
        }
        
         function SaveData() {           
			var o = form.getData();				
			form.validate();
			if (form.isValid() == false)
			return;
			if(form.isValid()==true){
      	    mini.mask({el: document.body,cls: 'mini-mask-loading',html: '登记中...'});
      	    }
			var json = mini.encode([o]);		
			$.ajax({
				url : "/sbk/BK.do?method=saveunit2",
				type : 'post',
				data : {
					data : json
				},
				cache : false,
				success : function(text) {	
				      mini.unmask();
				     if("0"== text)
				    {
				     mini.alert("登记成功");
				   
				     labelModel2();
				     mini.get("onoks").setEnabled(false);
				     mini.get("print").setEnabled(true);	
				    }
				    else
				    {
				      mini.alert("登记失败:"+text);
				    }				
				},
				error : function(jqXHR, textStatus, errorThrown) {
					mini.alert(jqXHR.responseText);					
				}
			});

		}	
             
      
          
            var LODOP; //声明为全局变量 
	function Preview() {		
	CreateTwoFormPage();
	  	LODOP.PREVIEW();		
	};
	
	function CreateTwoFormPage(){
	LODOP=getLodop();
var aac001 = mini.getbyName("aac001").getValue().trim(); 
var aac003 = mini.getbyName("aac003").getValue().trim(); 
var aac004 = mini.getbyName("aac004").getText().trim(); 
var aac002 = mini.getbyName("aac002").getValue().trim(); 
var aac006 = mini.getbyName("aac006").getValue().trim(); 
var aac005 = mini.getbyName("aac005").getText().trim();
LODOP.PRINT_INIT("");
LODOP.ADD_PRINT_TEXT(60,200,100,20,aac001);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(60,470,100,20,aac003);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(60,643,59,20,aac004);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(104,158,179,20,aac002);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(104,473,95,25,aac006);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(104,643,60,20,aac005);
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(202,138,494,95,"社保卡补卡");
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(320,138,494,40,"");
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(376,138,203,23,"");
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(376,535,100,20,"");
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);

}        
        
      function labelModel1() {
            var fields = form.getFields();                
            
                var c = fields[1];
                if (c.setReadOnly) c.setReadOnly(true);     //只读
                if (c.setIsValid) c.setIsValid(true);      //去除错误提示
                if (c.addCls) c.addCls("asLabel");          //增加asLabel外观

        }
        
        
        function labelModel2() {
            var fields = form.getFields();                
            for (var i = 0, l = fields.length; i < l; i++) {
                var c = fields[i];
                if (c.setReadOnly) c.setReadOnly(true);     //只读
                if (c.setIsValid) c.setIsValid(true);      //去除错误提示
                if (c.addCls) c.addCls("asLabel");          //增加asLabel外观
            }
        }
        
       
        
         function inputModel() {
            var fields = form.getFields();
            for (var i = fields.length-10, l = fields.length; i < l; i++) {
                var c = fields[i];
                if (c.setReadOnly) c.setReadOnly(false);
                if (c.removeCls) c.removeCls("asLabel");
            }
            mini.repaint(document.body);
        }
        
          function inputMode2() {
            var fields = form.getFields();        
                var c = fields[1];
                if (c.setReadOnly) c.setReadOnly(false);
                if (c.removeCls) c.removeCls("asLabel");
            mini.repaint(document.body);
        }
        

        
         function onReset(e) {
			form.clear();
			inputModel();
			inputMode2();
			$("#img0").attr("src", "");	
			mini.get("print").setEnabled(false);
		    mini.get("onoks").setEnabled(false);
			bklx();
		}		
</script>
  </body>
</html>
